package manong.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import javax.servlet.http.HttpServletRequest;

@Controller
public class IndexController {
    @RequestMapping("/")
    public String add() {
        return "/login.html";
    }

    @RequestMapping("/page")// 跳转到一个对应的页面
    public String toPage(String page){
        return page+".html";
    }
    @RequestMapping("/pageEdit")
    public String pageEdit(String page,String field,String value, HttpServletRequest request){
        request.setAttribute(field,value);
        return page+".html";
    }
    
}
